<template>
  <div>
    <button @click="decrement">-</button>
    <input class="input-value" v-model="val" />
    <button @click="increment">+</button>
  </div>
</template>
<script lang="ts">
/**
 * 页面核心数据结构体说明文档
 *
 *
 */
// import from

export default {
  name: 'InputNumber',
  props: {
    sampleP: {
      type: Number,
      default: 0
    },
    init: {
      type: Number,
      default: 11
    }
  },
  data() {
    return {
      sampleD: 'value',
      val: 11
    }
  },
  computed: {
    /* sampleC() {
      return this.sampleD + "--";
    }, */
  },
  created() {
    this.val = this.init
  },
  mounted() {},
  methods: {
    // sampleM() {},
    increment() {
      this.val++
    },
    decrement() {
      this.val--
    }
  },
  watch: {
    // sampleP(n, o) {},
    init(n, o) {
      this.val = this.init
    }
  }
}
</script>

<!--<style scoped>-->
<style lang="css" scoped>
.input-value {
  width: 80px;
}
</style>
